package wiki.so.api;

import il.ac.technion.wiki.impl.DataBase;

/**
 * Provides a {@link il.ac.technion.wiki.api.WikiPage wiki}-compatible data access layer,
 * extended to offer methods specific to the type of content stored on the Stack Overflow
 * website.
 *
 */
public interface IStackOverflowDatabase extends DataBase {
	/**
	 * Retrieve the corresponding question for a specified answer.
	 * @param ans	The answer to retrieve related question for.
	 * @return		The question being answered by <tt>ans</tt>.
	 */
	StackOverflowQuestion getQuestion(StackOverflowAnswer ans);
	
	/**
	 * Retrieve all answers to a specified question.
	 * @param q		The question to retrieve answers for.
	 * @return		An array of answers answering specified question.
	 */
	StackOverflowAnswer[] getAnswers(StackOverflowQuestion q);
}
